<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"><title>Nacos默认使用内网注册问题 | 狼族少年、血狼</title><meta name="author" content="狼族少年、血狼"><meta name="copyright" content="狼族少年、血狼"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="问题描述如下图所示，服务1和网关部署在服务器1上，服务2和nacos部署在服务器2上。网关调用服务1成功，调用服务2失败。报错如下：  1234567891011121314151617io.netty.channel.ConnectTimeoutException: connection timed out: &#x2F;10.0.0.12:8888        at io.netty.channel.">
<meta property="og:type" content="article">
<meta property="og:title" content="Nacos默认使用内网注册问题">
<meta property="og:url" content="https://geekwolfman.github.io/2023/03/23/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98.html">
<meta property="og:site_name" content="狼族少年、血狼">
<meta property="og:description" content="问题描述如下图所示，服务1和网关部署在服务器1上，服务2和nacos部署在服务器2上。网关调用服务1成功，调用服务2失败。报错如下：  1234567891011121314151617io.netty.channel.ConnectTimeoutException: connection timed out: &#x2F;10.0.0.12:8888        at io.netty.channel.">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/01cover.jpg">
<meta property="article:published_time" content="2023-03-23T15:52:48.000Z">
<meta property="article:modified_time" content="2023-03-23T15:59:26.723Z">
<meta property="article:author" content="狼族少年、血狼">
<meta property="article:tag" content="问题排查">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/01cover.jpg"><link rel="shortcut icon" href="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/config/avatar/avatar.png"><link rel="canonical" href="https://geekwolfman.github.io/2023/03/23/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/db.json","preload":false,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: true,
  }
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Nacos默认使用内网注册问题',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-03-23 23:59:26'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pace-js/themes/blue/pace-theme-minimal.min.css"/><script src="https://cdn.jsdelivr.net/npm/pace-js/pace.min.js"></script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/config/avatar/avatar.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">14</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/gallery/"><i class="fa-fw fas fa-images"></i><span> 画廊</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-paper-plane"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/01cover.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="狼族少年、血狼"><span class="site-name">狼族少年、血狼</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/gallery/"><i class="fa-fw fas fa-images"></i><span> 画廊</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-paper-plane"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Nacos默认使用内网注册问题</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-03-23T15:52:48.000Z" title="发表于 2023-03-23 23:52:48">2023-03-23</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-03-23T15:59:26.723Z" title="更新于 2023-03-23 23:59:26">2023-03-23</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">587</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>3分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Nacos默认使用内网注册问题"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="问题描述"><a href="#问题描述" class="headerlink" title="问题描述"></a>问题描述</h1><p>如下图所示，服务1和网关部署在服务器1上，服务2和nacos部署在服务器2上。网关调用服务1成功，调用服务2失败。报错如下：</p>
<p><img src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/1.jpg" alt="img"></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">io.netty.channel.ConnectTimeoutException: connection timed out: /<span class="number">10.0</span><span class="number">.0</span><span class="number">.12</span>:<span class="number">8888</span></span><br><span class="line">        at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$<span class="number">2.</span>run(AbstractEpollChannel.java:<span class="number">576</span>) ~[netty-transport-<span class="keyword">native</span>-epoll-<span class="number">4.1</span><span class="number">.59</span>.Final-linux-x86_64.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">        Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: </span><br><span class="line">Error has been observed at the following <span class="title function_">site</span><span class="params">(s)</span>:</span><br><span class="line">        |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]</span><br><span class="line">        |_ checkpoint ⇢ HTTP GET <span class="string">&quot;/app/blog/selectBlogPageByViews?pageNum=1&amp;pageSize=15&quot;</span> [ExceptionHandlingWebHandler]</span><br><span class="line">Stack trace:</span><br><span class="line">                at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$<span class="number">2.</span>run(AbstractEpollChannel.java:<span class="number">576</span>) ~[netty-transport-<span class="keyword">native</span>-epoll-<span class="number">4.1</span><span class="number">.59</span>.Final-linux-x86_64.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:<span class="number">98</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:<span class="number">170</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:<span class="number">164</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:<span class="number">472</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:<span class="number">384</span>) ~[netty-transport-<span class="keyword">native</span>-epoll-<span class="number">4.1</span><span class="number">.59</span>.Final-linux-x86_64.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.concurrent.SingleThreadEventExecutor$<span class="number">4.</span>run(SingleThreadEventExecutor.java:<span class="number">989</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.internal.ThreadExecutorMap$<span class="number">2.</span>run(ThreadExecutorMap.java:<span class="number">74</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:<span class="number">30</span>) ~[netty-common-<span class="number">4.1</span><span class="number">.59</span>.Final.jar!/:<span class="number">4.1</span><span class="number">.59</span>.Final]</span><br><span class="line">                at java.lang.Thread.run(Thread.java:<span class="number">748</span>) ~[na:<span class="number">1.8</span><span class="number">.0_312</span>]</span><br></pre></td></tr></table></figure>

<h1 id="问题排查"><a href="#问题排查" class="headerlink" title="问题排查"></a>问题排查</h1><p>注意报错第一行：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">io.netty.channel.ConnectTimeoutException: connection timed out: /<span class="number">10.0</span><span class="number">.0</span><span class="number">.12</span>:<span class="number">8888</span></span><br></pre></td></tr></table></figure>

<p>调用ip为10.0.0.12<strong>，</strong>为网卡地址：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">eth0: flags=<span class="number">4163</span>&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu <span class="number">1500</span></span><br><span class="line">        inet <span class="number">10.0</span><span class="number">.0</span><span class="number">.12</span>  netmask <span class="number">255.255</span><span class="number">.252</span><span class="number">.0</span>  broadcast <span class="number">10.0</span><span class="number">.3</span><span class="number">.255</span></span><br><span class="line">        inet6 fe80::<span class="number">5054</span>:ff:fe8d:bde  prefixlen <span class="number">64</span>  scopeid <span class="number">0x20</span>&lt;link&gt;</span><br><span class="line">        ether <span class="number">52</span>:<span class="number">54</span>:<span class="number">00</span>:<span class="number">8d</span>:0b:de  txqueuelen <span class="number">1000</span>  (Ethernet)</span><br><span class="line">        RX packets <span class="number">1405478</span>  bytes <span class="number">959876907</span> (<span class="number">915.4</span> MiB)</span><br><span class="line">        RX errors <span class="number">0</span>  dropped <span class="number">0</span>  overruns <span class="number">0</span>  frame <span class="number">0</span></span><br><span class="line">        TX packets <span class="number">1095472</span>  bytes <span class="number">217959210</span> (<span class="number">207.8</span> MiB)</span><br><span class="line">        TX errors <span class="number">0</span>  dropped <span class="number">0</span> overruns <span class="number">0</span>  carrier <span class="number">0</span>  collisions <span class="number">0</span></span><br></pre></td></tr></table></figure>

<p><img src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/2.png" alt="img"></p>
<p>说明nacos默认使用内网ip注册，不同内网之间不互通，因此调用失败。</p>
<h1 id="解决方式"><a href="#解决方式" class="headerlink" title="解决方式"></a>解决方式</h1><p>参考文档：<a target="_blank" rel="noopener" href="https://github.com/alibaba/spring-cloud-alibaba/blob/2021.x/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-example/readme-zh.md">spring-cloud-starter-alibaba-nacos-discovery文档</a></p>
<p><img src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/3.png" alt="img"></p>
<p>服务注册到Nacos时，<strong>默认使用的是网卡地址，为内网</strong>。服务运行在不同的服务器上，内网不互通，因此调用失败。我们可以在服务注册时，手动配置注册ip地址，填写公网即可。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">spring:</span></span><br><span class="line">  <span class="attr">cloud:</span></span><br><span class="line">    <span class="attr">nacos:</span></span><br><span class="line">      <span class="attr">discovery:</span></span><br><span class="line">        <span class="attr">ip:</span> <span class="string">xxxx</span>  <span class="comment"># 填写公网ip</span></span><br></pre></td></tr></table></figure>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href>狼族少年、血狼</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://geekwolfman.github.io/2023/03/23/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98.html">https://geekwolfman.github.io/2023/03/23/Nacos默认使用内网注册问题.html</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://geekwolfman.github.io" target="_blank">狼族少年、血狼</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E9%97%AE%E9%A2%98%E6%8E%92%E6%9F%A5/">问题排查</a></div><div class="post_share"><div class="social-share" data-image="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/Nacos%E9%BB%98%E8%AE%A4%E4%BD%BF%E7%94%A8%E5%86%85%E7%BD%91%E6%B3%A8%E5%86%8C%E9%97%AE%E9%A2%98/01cover.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/03/24/%E7%AE%80%E6%98%93%E7%89%88%E5%8D%B3%E6%97%B6%E9%80%9A%E8%AE%AF%E7%B3%BB%E7%BB%9F.html" title="简易版即时通讯系统"><img class="cover" src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/%E7%AE%80%E6%98%93%E7%89%88%E5%8D%B3%E6%97%B6%E9%80%9A%E8%AE%AF%E7%B3%BB%E7%BB%9F/01cover.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">简易版即时通讯系统</div></div></a></div><div class="next-post pull-right"><a href="/2023/03/23/%E7%AE%80%E5%8D%95%E6%9D%83%E9%99%90%E7%AE%A1%E7%90%86%E6%A8%A1%E5%9E%8B%E4%BB%8B%E7%BB%8D.html" title="简单权限管理模型介绍"><img class="cover" src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/articles/%E7%AE%80%E5%8D%95%E6%9D%83%E9%99%90%E7%AE%A1%E7%90%86%E6%A8%A1%E5%9E%8B%E4%BB%8B%E7%BB%8D/01cover.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">简单权限管理模型介绍</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://geekwolfman-blog.oss-cn-chengdu.aliyuncs.com/config/avatar/avatar.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">狼族少年、血狼</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">14</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">9</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://wpa.qq.com/msgrd?v=3&amp;uin=2370032534&amp;site=qq&amp;menu=yes&amp;jumpflag=1"><i class="fa-brands fa-qq"></i><span>添加博主QQ</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">本站所有博文均是博主的学习笔记与个人理解，来源于网络，如有<span style="color:red;font-weight:bold;">侵权</span>请<a target="_blank" rel="noopener" href="https://wpa.qq.com/msgrd?v=3&uin=2370032534&site=qq&menu=yes&jumpflag=1" style="color:#49B1F5;font-weight:bold">联系我</a>进行删除🥰。</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%97%AE%E9%A2%98%E6%8F%8F%E8%BF%B0"><span class="toc-number">1.</span> <span class="toc-text">问题描述</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%97%AE%E9%A2%98%E6%8E%92%E6%9F%A5"><span class="toc-number">2.</span> <span class="toc-text">问题排查</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%A7%A3%E5%86%B3%E6%96%B9%E5%BC%8F"><span class="toc-number">3.</span> <span class="toc-text">解决方式</span></a></li></ol></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By 狼族少年、血狼</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><div class="js-pjax"></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></body></html>